const mongoose = require("mongoose")
const consola = require("consola")
const URI = require("./db.conf")
const db = mongoose.connection
module.exports = function(app) {
  mongoose.connect(URI, { useNewUrlParser: true, useUnifiedTopology: true })
  db.on("success", () => {
    consola.info("mongoose connect success")
  })
  db.on("error", () => {
    consola.info("mongoose connect error")
  })
}
